package org.NooLab.texx.components.textprocs.variants;

import org.NooLab.randomgraph.RandomGraph;

import org.NooLab.somquery.*;
import org.NooLab.somquery.SomQueryConnection;
import org.NooLab.structures.randomgraph.RGraphPropertiesDefaultIntf;

/**
 * 
 * 
 * 
 */
public class PluggedCapabilities {

	RandomGraph randomGraph;
	
	private RGraphPropertiesDefaultIntf rgProperties;
	private boolean posTagsAvailable;
	
	//PoSTagger postgg;
	// PoSTaggerIntf posTagger ;
	
	
	boolean somQueryAvailable = false;
	SomQueryConnection sqConnection ;
	private SomQueryIntf somQuery;
	
	// ========================================================================
	public PluggedCapabilities(RandomGraph rGraph) {
		randomGraph = rGraph ;
		rgProperties = randomGraph.getRgProperties() ;
		
		checkForPosTags();
		getSomStoreQuery();
	}
	// ========================================================================
	
	
	/**
	 * checks all plugins whether any is implementing the interface "PoSTaggerIntf"
	 */
	public void checkForPosTags(){
		posTagsAvailable = false ;
		
		
		if (rgProperties.getPoStagSensitiveAsymmetry()>0){
			
		}
	}

	public void getSomStoreQuery(){
		
		somQuery = SomQueryFactory.getInstance() ;
		
		// sqConnection = somQuery.getConnection("main store") ;
		
		somQueryAvailable = sqConnection!=null ;
	}
	
	// ----------------------------------------------------

	public boolean isPosTagsAvailable() {
		return posTagsAvailable;
	}


	public boolean isSomQueryAvailable() {
		return somQueryAvailable;
	}
}
